import React from 'react';
import { Modal } from 'antd';
import { ExclamationCircleOutlined } from '@ant-design/icons';

export default (onOk?: Function) => {
  Modal.confirm({
    title: window.$app.t('preDeleteTip'),
    icon: <ExclamationCircleOutlined />,
    okText: window.$app.t('ok'),
    cancelText: window.$app.t('cancel'),
    content: '',
    onOk() {
      onOk?.();
    }
  });
}